import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import "@/assets/css/animate.css"


// 基础滚动
import stack from './views/signin/index.vue'
// 实例vue

import '@/assets/icon/iconfont.css'

import 'lib-flexible'
Vue.config.productionTip = false;
import "@/assets/css/reset.css"
// Vue.config.productionTip = false

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);

router.beforeEach((to,from,next) =>{
  // console.log(to)
  if(to.path == "/user"){
    if(localStorage.getItem("user")){
      next()
    }else{
      next("/login")
    }
  }else{
    next()
  }
})
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css';
// Vue.use(ElementUI);

// import VueAwesomeSwiper from 'vue-awesome-swiper'

// import 'swiper/css/swiper.css'

import BScroll from '@better-scroll/core'

Vue.use(VueAwesomeSwiper)

import ajaxAxios from '@/ajaxAxios'
Vue.prototype.$axios = ajaxAxios


//elmt
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ElementUI);

///swiper

import VueAwesomeSwiper from 'vue-awesome-swiper'

// import style
import 'swiper/css/swiper.css'
//
// import BScroll from '@better-scroll/core'
//animate.css



Vue.use(VueAwesomeSwiper, /* { default options with global component } */ )
import "@/assets/css/animate.css"

// import Vant from 'vant';
// import 'vant/lib/index.css';

// Vue.use(Vant);


new Vue({
  router,
  store,
  stack,
  render: h => h(App)
}).$mount('#app')